-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Containers docs: Uses importable env and removes manualStart #23815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: production
Are you sure you want to change the base?
Conversation
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
ok so this means a config like this would not have worked as of July 17 2025 My issue was that |
| MY_SECRET: this.env.MY_SECRET, | ||
| MY_SECRET: env.MY_SECRET, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs stay this.env as this refers to Container and this.env is inherited Container.env
it is env.MY_SECRET pattern that's throwing this on the dev tail:
✘ [ERROR] Uncaught ReferenceError: env is not defined
When I put this back to this.env in the Container envVars, it works again.
|
The FAQ says:
If the Secrets Store implementation is not working today, it should not be mentioned at all, or labeled as coming later.
^ this is what I've been trying to get to work, want to know if this is essentially a burned strategy I'm at the stage where I'm nuking my worker on the GUI to start over. |
|
In env-vars-and-secrets, this doesn't make sense to me:
I'm confused why the config mentions the secret, but sets it to an obviously fake value. Shouldn't
Later: all I see so far is you typed in |
|
Everywhere resources are being added, but can be inherited into an environment, I think it's worth mentioning that setting |
|
I'll circle back on Monday. Have a great weekend. I have to state this though: Kubernetes would have been easier. |
|
I forked the uv maintainer's cloudflare container example repo and made some alterations: The few changes I made:
I think this template (after a few more bells and whistles) should be offered on the "Get Started" -> "Select a template" menu. |


Summary
This PR uses importable env to set environment variable at the class level. This is needed for most use cases.
It also removes the secret store example. While Secret Store can be used, most users are setting secrets at the class level, which happens outside of Workers I/O context. This means that you can't get a secret from the store. Rather than explain this, I've just removed it, and will circle back once a deeper integration is made.
Also, removes
manualStartas this is no longer used and clarifies some wording around when containers start.Documentation checklist